function toBoolean(something: any): boolean {
    return something as boolean;
}
console.log(toBoolean(1));// 1
// 而类型转换则会影响编译结果：
function toBoolean2(something: any): boolean {
    return Boolean(something);
}
console.log(toBoolean2(1)); // true
